import $http from "./index.js"

//细节数据账单
export const getDetailData = (page) =>{
	return $http.get("/saleDetailData/getDetailData/"+page)
}

export const getDetailDayByHeader = (name) =>{
	return $http.get("/saleDetailData/getDetailDayByHeader/"+name)
}
export const getDetailDataByTime = (time) =>{
	return $http.get("/saleDetailData/getDetailDataByTime/"+time)
}
//日账单
export const getDayData = (page) =>{
	return $http.get("/saleData/getDayData/"+page)
}
export const getDayDataByTime = (time) =>{
	return $http.get("/saleData/getDayDataByTime/"+time)
}

//周账单
export const getWeekData = (page) =>{
	return $http.get("/saleWeekData/getWeekData/"+page)
}
export const getWeekDataByTime = (time) =>{
	return $http.get("/saleWeekData/getWeekDataByTime/"+time)
}

//月账单
export const getMonthData = (page) =>{
	return $http.get("/saleMonthData/getMonthData/"+page)
}
export const getMonthDataByTime = (time) =>{
	return $http.get("/saleMonthData/getMonthDataByTime/"+time)
}

//年账单
export const getYearData = (page) =>{
	return $http.get("/saleYearData/getYearData/"+page)
}
export const getYearDataByTime = (time) =>{
	return $http.get("/saleYearData/getYearDataByTime/"+time)
}
//更新数据
export const updateDetailData = (data) =>{
	return $http.post("/saleDetailData/updateDetailData/",data)
}
export const updateDayData = (data) =>{
	return $http.post("/saleData/updateDayData/",data)
}

//插入数据
export const insertDetailData = (data) =>{
	return $http.post("/saleDetailData/insertDetailData/",data)
}
export const insertDayData = (data) =>{
	return $http.post("/saleData/insertDayData/",data)
}